﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Loong.Model
{
    /// <summary>
    /// 内容标签
    /// </summary>
    [Serializable]
    public class ContentTagInfo
    {
        private int id;

        public int Id
        {
            get { return this.id; }
            set { this.id = value; }
        }


        private string name;

        public string Name
        {
            get { return this.name;}
            set{this.name=value;}
        }

        //循环匹配
        private bool loopMatching = false;

        public bool LoopMatching
        {
            get { return this.loopMatching; }
            set { this.loopMatching = value; }
        }


        //分页匹配
        private bool pageMatching = false;


        public bool PageMatching
        {
            get { return this.pageMatching; }
            set { this.pageMatching = value; }
        }

       
        //译为英文
        private bool toEn = false;

        public bool ToEngelist
        {
            get { return this.toEn; }
            set { this.toEn = value; }
        }


        //译为繁体中文
        private bool toTCn = false;

        public bool ToTCH
        {
            get { return this.toTCn; }
            set { this.toTCn = value; }
        }
        //译为简体中文
        private bool toSCn = false;

        public bool ToSCH
        {
            get { return this.toSCn; }
            set { this.toSCn = value; }
        }
        //开始字符串
        private string beginMathing;

        public string BeginMathing
        {
            get { return this.beginMathing; }
            set { this.beginMathing = value; }
        }
        //结束字符串
        private string endMathing;

        public string EndMatching
        {
            get { return this.endMathing; }
            set { this.endMathing = value; }
        }

       
        //相对路径补全为绝对络径
        private bool toAbsolutePath;

        public bool ToAbsolutePath
        {
            get { return this.toAbsolutePath; }
            set { this.toAbsolutePath = value; }
        }

        //下载图片
        private bool isDownloadImg;

        public bool IsDownloadImg
        {
            get { return this.isDownloadImg; }
            set { this.isDownloadImg = value; }
        }
        //下载flash
        private bool isDownloadFlash;

        public bool IsDownloadFlash
        {
            get { return this.isDownloadFlash; }
            set { this.isDownloadFlash = value; }
        }

        //探测文件并直接下载
        private bool isDownloadFile;

        public bool IsDownloadFile
        {
            get { return this.isDownloadFile; }
            set { this.isDownloadFile = value; }
        }
        //探测真实的文件路径
        private bool findRealFile;

        public bool FindRealFile
        {
            get { return this.findRealFile; }
            set { this.findRealFile = value; }
        }

        private string fileInclude;

        public string FileInclude
        {
            get { return this.fileInclude; }
            set { this.fileInclude = value; }
        }
        //文件保存格式
        private string filesaveFormat;

        public string FileSaveFormat
        {
            get { return this.filesaveFormat; }
            set { this.filesaveFormat = value; }
        }
        //必须包含字符
        private string includeString;

        public string IncludeString
        {
            get { return this.includeString; }
            set { this.includeString = value; }
        }
        //不得包含的字符
        private string noIncludeString;

        public string NoIncludeString
        {
            get { return this.noIncludeString; }
            set { this.noIncludeString = value; }
        }

        //排除内容
        private Queue<string> clearString;

        public Queue<string> ClearString
        {
            get { return this.clearString; }
            set { this.clearString = value; }
        }

        //替换内容
        private Queue<string[]> replaceString;

        public Queue<string[]> ReplaceString
        {
            get {return this.replaceString; }
            set { this.replaceString = value; }
        }

        //采集结果不能为空
        private bool resultIsNoEmpty = false;

        public bool ResultIsNoEmpty
        {

            get { return this.resultIsNoEmpty; }
            set { this.resultIsNoEmpty = value; }
 
        }

        private Queue<int> clearHtmlTag=new Queue<int>();

        public Queue<int> ClearHtmlTag
        {
            get { return this.clearHtmlTag; }
            set { this.clearHtmlTag = value; }
        }




        private string[,] htmltag = new string[24,2] { 
        { "连接", "<a" }, 
        { "表格", "<table" }, 
        { "表格行", "<tr" }, 
        { "单元行", "<td" }, 
        { "段落", "<p>" } ,
        { "字体", "<font" } ,
        { "层", "<div" } ,
        { "文本容器", "<span" } ,
        { "表格休", "<tbody" } ,
        { "图片", "<img" } ,
        { "脚本", "<script" } ,
        { "加粗", "<stong" } ,
        { "换行", "<br" } ,
        { "空格", "<br" } ,
        { "标题", "<h" } ,
        { "横线", "<hr" } ,
        { "表单", "<hr" } ,
        { "框架", "<frame" }, 
        { "列表", "<uc <li" } ,
        { "tab换行", "\r\n" } ,
        { "地图", "<area" } ,
        { "框架", "<iframe" } ,
        { "表单", "<hr" } ,
        { "所有", "<" } ,

        };



        public ContentTagInfo()
        { 
 
        }

        public string[,] HTMLTag
        {
            get { return this.htmltag; }
        }


    }
}
